package Object;

public class Duck extends Animal implements IAmphibious {


    public Duck(String name) {
        super(name);
    }

    @Override
    public void fly() {
        System.out.println(getName() + " is flying");
    }

    @Override
    public void run() {
        System.out.println(getName() + " is running");
    }

    @Override
    public void swim() {
        System.out.println(getName() + " is swimming");
    }
}
